/*****************************************************************************/
/** \file mc_start.h
**
** 
**
** History:
** 
*****************************************************************************/
#ifndef  __MC_START_H__
#define  __MC_START_H__

/*****************************************************************************/
/* Include files */
/*****************************************************************************/

/*****************************************************************************/
/* Global pre-processor symbols/macros ('#define') */
/*****************************************************************************/
#define  s8   signed char
#define  s16  signed short int
#define	 s32  signed int 
#define	 u8   unsigned char 
#define	 u16  unsigned short int 
#define	 u32  unsigned int 

/*****************************************************************************/
/* Global type definitions ('typedef') */
/*****************************************************************************/
typedef struct
{
	s32		Mode;
	s32 	PRM_Init;
	s32 	PRM_Target;
	s32     DeltaTheta;
	s32		Align_Time;
	s32		Align_Curr;
	s32		Run_Curr_Init;
	s32		Run_Curr_Final;
	s32		Run_Time;
	s32 	Theta_Init;	
}StartUp_Component_t;

typedef struct
{
	s32		K_Iq;
	s32 	K_We;
	s32     Time_Counter;
	s32     Theta;
	s32 	Iq_Ref;
	s32     Theta_Phase;
	s32     K_Theta;
	s32     DeltaTheta;
	s32     Theta_lpf;
}StartUpVar_Component_t;
/*****************************************************************************/
/* Global variable declarations ('extern', definition in C source) */
/*****************************************************************************/
extern StartUpVar_Component_t   	s_StartVar;
extern StartUp_Component_t  		s_StartUp;
extern s32 							l_Time_Counter_all_s32;
extern u16  						l_TargetRPM_Cnt_u16;


/*****************************************************************************/
/* Global function prototypes ('extern', definition in C source) */
/*****************************************************************************/
void 								f_StartUp_Para_Init(void);
void 								MC_OpenLoop_Start(void);
void 								Mot_IPD_OL_Start(void);
void 								MC_Startup_Init(void);

#endif 	/* __MC_START_H__ */

